﻿Public Class frmListarProgramas

    Private Sub frmListarProgramas_Activated(sender As Object, e As EventArgs) Handles Me.Activated
        ModuloGeneral.Centrar(Me.Panel1)
    End Sub

    Private Sub ListarProgramas_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        With dgvListaProgramas
            .AutoGenerateColumns = False
            .AllowUserToAddRows = False
            .AllowUserToDeleteRows = False
            .Columns.Clear()

            .Columns.Add("Id", "Id")
            .Columns.Add("Programa", "Programa")
            .Columns.Add("FechaInicio", "FechaInicio")
            .Columns.Add("FechaFinalizacion", "FechaFinalizacion")
            .Columns.Add("Alcance", "Alcance")


            .Columns(0).DataPropertyName = "Id"
            .Columns(0).Visible = False
            .Columns(0).Width = 10
            .Columns(1).DataPropertyName = "Nombre"
            .Columns(1).Visible = True
            .Columns(1).Width = 200
            .Columns(2).DataPropertyName = "Fecha"
            .Columns(2).Visible = True
            .Columns(2).Width = 100
            .Columns(3).DataPropertyName = "FechaFinalizacion"
            .Columns(3).Visible = True
            .Columns(3).Width = 100
            .Columns(4).DataPropertyName = "Alcance"
            .Columns(4).Visible = True
            .Columns(4).Width = 100
            .DataSource = New BindingSource(objGestor.listarPrograma(), Nothing)
        End With
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Me.Close()
    End Sub

    Private Sub dgvListaProgramas_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvListaProgramas.CellContentClick

    End Sub
End Class